package com.flycat.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import java.util.List;

/**
 * @Author yalei.chen
 * @Date 2017/10/21
 * @Since JDK 1.8
 */
@Getter
@Setter
@ToString(callSuper = true)
public class MenuDTO {

    @ApiModelProperty(value="主键id")
    private Integer id;

    @ApiModelProperty(value="名称")
    private String name;

    @ApiModelProperty(value="资源地址")
    private String url;

    @ApiModelProperty(value="是否为父节点, 0:否；1:是")
    private Byte isParent;

    @ApiModelProperty(value="父资源id")
    private Integer pid;

    @ApiModelProperty(value="子节点")
    List<MenuDTO> subMenus;

    public MenuDTO() {
    }

    public MenuDTO(String name, String url, Byte isParent, Integer pid, List<MenuDTO> subMenus) {
        this.name = name;
        this.url = url;
        this.isParent = isParent;
        this.pid = pid;
        this.subMenus = subMenus;
    }


}
